//
//  HZBaseNavRootViewController.m
//  HZTC_YaDeArt
//
//  Created by MayerF on 17/3/21.
//  Copyright © 2017年 HZTC. All rights reserved.
//

#import "HZBaseNavRootViewController.h"

@interface HZBaseNavRootViewController ()

@end

@implementation HZBaseNavRootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
//    [self setLeftBarBtnItemImage:nil title:@"left"];
}

- (void)setLeftBarBtnItemImage:(NSString *)imageName title:(NSString *)title
{
    UIButton *leftButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 30)];
    [leftButton setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
    [leftButton setTitle:title forState:UIControlStateNormal];
    leftButton.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 20);
    [leftButton addTarget:self action:@selector(leftBtnOnClick) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton];
}
- (void)leftBtnOnClick {
    [[NSNotificationCenter defaultCenter] postNotificationName:kShowLeftController object:nil];
}

@end
